<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Dosen extends CI_Controller
{
	var $engineReturn 	= array();
	var $specialValue 	= array();
	var $data			= array();
	
	var $loginIdUser		= "";
	var $loginAksesUser		= "";
	var $menuUserOtority	= "dosen";
	
	public function __construct()
	{
		parent::__construct();
	}
	
	
	public function index()
	{
		$this->data["baseUrl"]			= $this->config->item('base_url');
		$this->data["baseUrlSave"]		= $this->config->item('base_url')."?";
		$this->data["engineTemplate"]	= $this->config->item('base_url')."application/views/engine/template/";
		$this->data["engineModule"]		= $this->config->item('base_url')."application/views/engine/module/";
		$this->data["otority"]			= $this->menuUserOtority;
		$this->data["engineReturn"]		= $this->engineReturn;
		$engineSetting	= array();	
		$system			= $this->uri->segment(2);
		$module			= $this->uri->segment(3);
		$rule			= $this->uri->segment(4);
		$this->load->library('session');
		$this->load->model("engine/master");
		$this->load->model("manual/mod_nilai");
		$this->loginIdUser	= $this->session->userdata('userId');
		$this->loginAksesUser	= $this->session->userdata('akses');
		$this->master->printArr($this->session->userdata, false);
		if($system=='logout')
		{
			$this->session->sess_destroy();
		}
		if($this->loginAksesUser!=$this->menuUserOtority || ($system=='logout'))
		{
			if($system=='ajax')
			{
				$this->output->enable_profiler(false);
				$loginProcess = $this->loginUser();
				if($loginProcess['login'])
				{
					$this->session->sess_destroy();
					$this->session->set_userdata(
										array(
											'userId' 	=> $loginProcess['id']
											, 'akses'	=> $this->menuUserOtority
										)
									);
				}
				$this->load->view("engine/module/login", array(
															'otority' 	=> $this->data["otority"]
															,'engineReturn' 	=> $this->data["engineReturn"]
															, 'baseUrlSave'	=> $this->data["baseUrlSave"]
															, 'login'		=> $loginProcess['login']
															));
			}
			else
			{
				$this->data["engineReturn"]["title"]		= "Login Dosen";
				$this->output->enable_profiler(false);
				$this->load->view("engine/template/header", $this->data);
				$this->load->view("engine/template/login", $this->data);
				$this->load->view("engine/template/footer");
			}
		}
		else
		{
			$this->output->enable_profiler(false);
			$this->master->set_ID_USER($this->loginIdUser);
			$this->master->set_USER_OTORITY($this->menuUserOtority);
			switch($system)
			{
				case "manual":
					$this->load->model("engine/mod_sys");
					switch($module)
					{
						case "input_nilai_sub_guru":
// guru/manual/input_nilai_sub_guru/tahun/kodekelas/kodemapel
							$n_tahun		= $this->uri->segment(4);
							$n_kodekelas	= $this->uri->segment(5);
							$n_kodemapel	= $this->uri->segment(6);
							$n_katnilai		= $this->uri->segment(7);
							$this->data['mode']	= "";
							if($n_tahun=="" || $n_kodekelas=="")
							{
								// Disini nampilin list tahun ama kelas
								$this->data['tahun']	= $this->mod_sys->get_tahun_ajaran_nilai($this->loginIdUser);
								$this->data['kelas']	= $this->mod_sys->get_kelas_nilai($this->loginIdUser);
								$this->data['mode']		= "tahun_kelas";
								// terus enter
							}
							elseif($n_tahun!="" & $n_kodekelas!="" & $n_kodemapel=="")
							{
								// Ama Link buat clear seleksi
								// Disini nampilin Mata Pelajaran si guru	
								$this->data['tahun']	= $this->mod_sys->get_tahun_ajaran_from_id($n_tahun);
								$this->data['kelas']	= $this->mod_sys->get_kelas_from_id($n_kodekelas);
								$this->data['mapel']	= $this->mod_sys->get_mapel($this->loginIdUser,$n_tahun,$n_kodekelas);
								$this->data['mode']		= "mapel";
							}
							elseif($n_kodemapel!="")
/*
							{ 
								$this->data['tahun']		= $this->mod_sys->get_tahun_ajaran_from_id($n_tahun);
								$this->data['kelas']		= $this->mod_sys->get_kelas_from_id($n_kodekelas);
								$this->data['mapel']		= $this->mod_sys->get_mapel_from_id($n_kodemapel);
								$this->data['kat_nilai']	= $this->mod_sys->get_kategori_nilai(	);
								$this->data['mode']			= "nilai";
								// Setelah itu otomatis save
							}
							elseif($n_katnilai!="")
*/
							{ 
								$this->data['tahun']		= $this->mod_sys->get_tahun_ajaran_from_id($n_tahun);
								$this->data['kelas']		= $this->mod_sys->get_kelas_from_id($n_kodekelas);
								$this->data['mapel']		= $this->mod_sys->get_mapel_from_id($n_kodemapel);
								$this->data['kat_nilai']	= $this->mod_sys->get_kat_nilai_from_id($n_katnilai);
								$id_kelas_detail			= $this->mod_sys->get_kelas_detail_nilai(
																	$n_tahun, 
																	$n_kodekelas);

								
//								$post_kat_nilai				= $this->input->post("kat_nilai");
								$post_kode_mapel			= $this->input->post("kode_mapel");
								$post_kirim					= $this->input->post("kirim");
								if($post_kirim=="simpan")
								{
									foreach($this->input->post() as $nm=>$po)
									{
										if(substr($nm, 0, 2)=="nm")
										{
											$nimnya 		= substr($nm,-(strlen($nm)-2));
											$nilai 			= $this->input->post("nil-".$po);
											$kelas_siswa 	= $this->input->post("ids-".$po);
											$this->mod_sys->update_nilai( $post_kode_mapel
																		, $kelas_siswa
																		, $nilai
																		, $id_kelas_detail
																		, $nimnya);
										}
									}
								}
								
								$this->data['mode']			= "kat_nilai";
								// Disini ditampilin semua siswa berjajar ke bawah
								$this->data['list_siswa']	= $this->mod_sys->get_list_siswa_nilai(
															$this->loginIdUser,
															$id_kelas_detail,
															$n_kodemapel
															);
								
								// setelah itu kekanan kolom untuk nilai
								// Setelah itu otomatis save
								
							}
							
							
							$this->data['engineReturn']['title'] = "Nilai Dosen";
							$view_name	= "nilai_guru";
						break;
						default:
							$this->data['engineReturn']['title'] = "Welcome";
						break;
					}
					if($rule=="ajax")
					{
						$this->output->enable_profiler(false);
						$this->load->view("engine/manual/$view_name", $this->data);
					}
					else
					{
						$this->load->view("engine/template/header", $this->data);
						$menu		= $this->master->getMenu($this->menuUserOtority, $this->loginIdUser);
						$this->load->view("engine/template/left", array('menu'=>$menu, 'base_url'=>$this->data["baseUrlSave"]));
						$this->load->view("engine/template/right_first",array("title"=>$this->data['engineReturn']['title']));
						$this->load->view("engine/manual/$view_name", $this->data);
						$this->load->view("engine/template/right_last");
						$this->load->view("engine/template/footer");
					}
				break;
				case "engine":
				default:
					switch($module)
					{
						case "upload_materi_sub_guru":
							$this->engineReturn = $this->$module("Upload Materi", "upload_materi_sub_guru");
						break;
						case "jadwal_mengajar_sub_guru":
							$this->engineReturn = $this->$module("Jadwal Mengajar", "jadwal_mengajar_sub_guru");
						break;
						case "input_nilai_sub_dosen":
							$this->engineReturn = $this->$module("Input Nilai", "input_nilai_sub_dosen");
						break;
						case "e_learning_sub_guru":
							$this->engineReturn = $this->$module("E Learning", "e_learning_sub_guru");
						break;
						case "penelitian_det_guru":
							$this->engineReturn = $this->$module("Penelitian", "penelitian_det_guru");
						break;
						case "edit_profile_sub_guru":
							$this->engineReturn = $this->$module("Edit Profil Dosen", "edit_profile_sub_guru");
						break;
						default:
							$this->data['engineReturn']['title'] = "Welcome";
						break;
					}
					$this->data["engineReturn"]	= $this->engineReturn;
					if(!isset($this->data['engineReturn']['title']))
						$this->data['engineReturn']['title'] = 'Welcome';
					if($rule=="ajax")
					{
						$this->output->enable_profiler(false);
						$this->load->view("engine/module/main", $this->data);
					}
					else
					{
						$this->output->enable_profiler(false);
						$this->load->view("engine/template/header", $this->data);
						$menu		= $this->master->getMenu($this->menuUserOtority, $this->loginIdUser);
						$this->load->view("engine/template/left", array('menu'=>$menu, 'base_url'=>$this->data["baseUrlSave"]));
						$this->load->view("engine/template/right_first",array("title"=>$this->data['engineReturn']['title']));
						$this->load->view("engine/module/main", $this->data);
						$this->load->view("engine/template/right_last");
						$this->load->view("engine/template/footer");
					}
				break;
			}
		}
	}
	
	public function loginUser()
	{
		$user	= $this->uri->segment(3);
		$pass	= $this->uri->segment(4);
		$sql	= "SELECT kode_dosen, `pass` FROM tbl_dosen
					WHERE
					kode_dosen 	= '$user'
					"
					."AND
					`status`	= '1'";
		$rec	= $this->db->query($sql);
		$count	= $rec->num_rows();
		$res	= $rec->result_array();
		if($count>0)
			if($this->pass_word->decryptPass($res[0]['pass'])==$pass)
				return array('login'=>true,'id'=>$res[0]['kode_dosen']);
		else
			return array('login'=>false);
	}
	public function sample($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, true										// Insert new record
		, true										// Edit Record
		, true										// Delete Record
		, true										// Edit Record if not null
		, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
		,  "sample_table_all_of"					// Table Name
		, false										// Input Mode cross record
		, ""										// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, 'sample'									// modulename
		);
		$arrayField 	= array(
							array(
									"id_coba"					// Field_name
									, "ID"						// Text
									, $this->master->FIELD_VALUE_AUTO	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, true						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
								)
							, array(
									"kode_coba"					// Field_name
									, "Kode"					// Text
									, $this->master->FIELD_VALUE_USER	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 100
													, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
													)
											)
									, true						// Primary key
									, true						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, $this->master->INPUT_TYPE_MEDIUM_TABLE	// filter source
								)
							, array(
									"nama"						// Field_name
									, "Nama"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"pass"						// Field_name
									, "Password"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_PASSWORD
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, true						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"text_area"						// Field_name
									, "Text Area"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT_AREA
											, array(
													"ROWS" 			=> 5
													, "COLS"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"text_area_plus"						// Field_name
									, "Text Area Plus"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT_AREA_PLUS_EDITOR
											, array(
													"ROWS" 			=> 5
													, "COLS"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"jenis_kelamin"				// Field_name
									, "Jenis Kelamin"			// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_RADIO
											)
									, false						// Primary key
									, false				// view
									, true						// edit
									, array(array("l", "Laki-laki")
											, array("p", "Perempuan")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_RADIO
											, null)						// filter source 
								)
							, array(
									"hoby"						// Field_name
									, "Hoby"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_CHECKBOX
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(array("Olahraga")
											, array("Makan Permen")
											, array("Belajar")
											, array("Main ini itu")
											, array("Gak punya hoby")
											, array("ML (Makan Lontong)")
											)
									, array($this->master->VALIDATION_NONE
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SELECT)						// filter source 
								)
							, array(
									"warna_kulit"				// Field_name
									, "Warna Kulit"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SELECT
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(array("Hitam")
											, array("PUTIH")
											, array("PUCAT")
											, array("KASAR")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SELECT)		// filter source 
								)
							, array(
									"agama"						// Field_name
									, "Agama"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array("data_opsi"						// field
											, "id_opsi"						// id 
											, "sample_table_opsi_data"		// table source						
											, array(
													array(
														"data_opsi",					// field name
														$this->master->OPERATOR_LIKE,	// operand
														"a",								// value
														),
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("sample_table_opsi_data", "id_opsi")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"kebangsaan"				// Field_name
									, "Kebangsaan"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MEDIUM_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array(
											array(array("nama_data","nd", true, "Nama Data")
													, array("select_one", "so", false, "Select One", 
													array(array("m", "Male"),array("f", "Female")))
												)						// field
											, "id_opsi"						// id 
											, array("sample_table_select_data", "stsd")	// table_name						
											, array(
												array(
													array("sample_table_opsi_data","stod")	// table join
													, array("sample_table_select_data","stsd")				// table source
													, "id_opsi"									// field join
													, "id_opsi"									// field source
													, array(array("data_opsi","",true, "Data Opsi"))					// field join
													)
												)
											, array(
													array(
														array("sample_table_opsi_data", "stod"),					// table name
														"data_opsi",					// field name
														$this->master->OPERATOR_LIKE,	// operand
														"a",								// value
													),
												)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("sample_table_select_data", "id_opsi")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_MEDIUM_TABLE
											, null
									)						// filter source 
								)
							, array(
									"keituan"				// Field_name
									, "Keituan"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_ADVANCE_TABLE
											, array()
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
											array(array("nama_data", "nd", true, "Nama Data")
													, array("select_one", "so", true, "Select One", array(array("m", "Male"),array("f", "Female")))
												)							// field
											, "id_opsi"						// id 
											, array("sample_table_select_data", "stsd")	// table_name						
											, array(
												array(
													array("sample_table_opsi_data","stod")	// table join
													, array("sample_table_select_data","stsd")				// table source
													, "id_opsi"									// field join
													, "id_opsi"									// field source
													, array(array("data_opsi","",true, "Data Opsi"))					// field join
													)
												)
											, array(										// filter field
													array("Select Data"					
														, array("sample_table_select_data", "stsd")// table destination
														, "nama_data"						// field destination
														, $this->master->INPUT_TYPE_TEXT			// type input search
														, array()							// source
														)
													, array("Search Radio"					
														, array("sample_table_select_data", "stsd")// table destination
														, "select_one"							// field destination
														, $this->master->INPUT_TYPE_RADIO			// type input search
														, array(array("m", "Male")
																,array("f", "Female"))		// source
														)
													, array("Search Select"					
														, array("sample_table_select_data", "stsd")// table destination
														, "select_one"							// field destination
														, $this->master->INPUT_TYPE_SELECT			// type input search
														, array(array("m", "Male")
																,array("f", "Female"))		// source
														)
													, array("Search Select"
														, array("sample_table_opsi_data", "stod")
														, "id_opsi"
														, $this->master->INPUT_TYPE_SIMPLE_TABLE
														, array("data_opsi"						// field
																, "id_opsi"						// id 
																, "sample_table_opsi_data"		// table source						
																)
														)
												)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("sample_table_select_data","id_opsi")
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							, array(
									"keyword"					// Field_name
									, "Keyword"				// Text
									, $this->master->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MULTIPLE_VALUE_OUT_TABLE											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
										"sample_table_multiple_input_base"			// table name
										, array("nama_data", "Keyword")				// field name
										, "id_multiple_input_base"					// field key
										, "sample_table_multiple_input"				// out source table name
										, "id_multiple_input"						// out source field key
										, "multiple_input_data"						// out source field data
										, "id_coba"									// out source field foreign
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							, array(
									"pengarang"					// Field_name
									, "Pengarang"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MULTIPLE_VALUE_OUT_TABLE_FOREIGN	)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
										"sample_table_multiple_input_base"			// table name
										, array("nama_data", "Keyword")				// field name
										, "id_multiple_input_base"					// field key
										, "sample_table_multiple_input_foreign"		// out source table name
										, "id_multiple_input"						// out source field key
										, "id_multiple_base"						// out source field data
										, "id_coba"									// out source field foreign
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							, array(
									"image"					// Field_name
									, "Image"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MULTIPLE_VALUE_IMAGE											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
										"sample_table_multiple_image"			// out source table name
										, "id_multiple_image"					// out source field key
										, "id_coba"								// out source field foreign
										, "image"								// out source field name
										, "sample"								// directory name for image
											)
									, array($this->master->VALIDATION_FILE_TYPE
											, array("jpg", "png", "bmp", "gif", "swf")
											, array(
												array(
														"initial" 	=>	"resizeWidth"
														, "width" 	=>	200
														, "height"	=>  0
														, "type"	=> "resize"
													),
												array(
														"initial" 	=>	"resizeHeight"
														, "width" 	=>	0
														, "height"	=>  200
														, "type"	=> "resize"
													),
												array(
														"initial" 		=>	"crop"
														, "width" 		=>	200
														, "height"		=>  0
														, "type"		=> "crop"
													),
												array(
														"initial" 	=>	"admin"
														, "width" 	=>	100
														, "height"	=>  0
														, "type"	=> "crop"
														, "thumb_admin"	=> true
													),
												)				// resize
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							, array(
									"image_single"				// Field_name
									, "Image Single"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_IMAGE
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("sample_single")
									, array($this->master->VALIDATION_FILE_TYPE
											, array("jpg", "jpeg", "png", "bmp")
											, array(
												array(
														"initial" 	=> "resizeWidth"
														, "width" 	=> 200
														, "height"	=> 0
														, "type"	=> "resize"
													),
												array(
														"initial" 	=> "resizeHeight"
														, "width" 	=> 0
														, "height"	=> 200
														, "type"	=> "resize"
													),
												array(
														"initial" 	=>	"crop"
														, "width" 	=>	200
														, "height"	=>  0
														, "type"	=> "crop"
													),
												array(
														"initial" 	=>	"admin"
														, "width" 	=>	100
														, "height"	=>  0
														, "type"	=> "crop"
														, "thumb_admin"	=> true
													),
												)				// resize
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array(
												"Sub Input for data Sample",
												array
												(
													array
													(
															"nama"							// Field_name
															, "Nama"							// Text
															, $this->master->FIELD_VALUE_DEFAULT	// Value method
															, array(							// Input type
																	$this->master->INPUT_TYPE_TEXT
																	, array(
																			"MAX_LENGTH" 	=> 200
																			, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
																			)
																	)
															, null								// source
															, $this->master->VALIDATION_NOTNULL // validation
													),
													array
													(
															"keterangan"							// Field_name
															, "Nama"							// Text
															, $this->master->FIELD_VALUE_DEFAULT	// Value method
															, array(							// Input type
																	$this->master->INPUT_TYPE_TEXT_AREA
																	, array(
																			"ROWS" 	=> 5
																			, "COLS"		=> $this->master->ATTR_SIZE_MEDIUM
																			)
																	)
															, null								// source
															, $this->master->VALIDATION_NOTNULL // validation
													),
													array
													( "jenis_kelamin"							// Field_name
															, "Jenis Kelamin"							// Text
															, $this->master->FIELD_VALUE_DEFAULT	// Value method
															, array(							// Input type
																	$this->master->INPUT_TYPE_RADIO
																	)
															, array(array("l", "Laki-laki")
																		, array("p", "Perempuan")
																	)
																									// source
															, $this->master->VALIDATION_NOTNULL // validation
													),
													array
													( 
														"itu"								// Field_name
														, "Itu select"							// Text
														, $this->master->FIELD_VALUE_DEFAULT	// Value method
														, array
															(							// Input type
																$this->master->INPUT_TYPE_SELECT
															)
														, array(array("Hitam")
																, array("PUTIH")
																, array("PUCAT")
																, array("KASAR")
															)								// source
														, $this->master->VALIDATION_NOTNULL // validation
													),
													array
													( 
														"agama"								// Field_name
														, "Agama"							// Text
														, $this->master->FIELD_VALUE_DEFAULT	// Value method
														, array
															(							// Input type
																$this->master->INPUT_TYPE_SIMPLE_TABLE
															)
														, array
															(
																"data_opsi"						// field
																, "id_opsi"						// id 
																, "sample_table_opsi_data"		// table source						
															)								// source
														, array
															(
																$this->master->VALIDATION_MATCH_TABLE
																, array("sample_table_opsi_data", "id_opsi")
															) // validation
													),
													array
													( 
														"kebangsaan"								// Field_name
														, "Kebangsaan"							// Text
														, $this->master->FIELD_VALUE_DEFAULT	// Value method
														, array
															(							// Input type
																$this->master->INPUT_TYPE_MEDIUM_TABLE
															)
														, array
															(
																array(array("nama_data","nd", true, "Nama Data")
																		, array("select_one", "so", false, "Select One", 
																		array(array("m", "Male"),array("f", "Female")))
																	)										// field
																, "id_opsi"									// id 
																, array("sample_table_select_data", "stsd")	// table_name						
																, array
																	(
																	array(
																		array("sample_table_opsi_data","stod")		// table join
																		, array("sample_table_select_data","stsd")	// table source
																		, "id_opsi"									// field join
																		, "id_opsi"									// field source
																		, array
																			(
																				array("data_opsi","",true, "Data Opsi")
																			)	// field join
																		)
																	)
															)
														, array
															(
																$this->master->VALIDATION_MATCH_TABLE
																, array("sample_table_select_data", "id_opsi")
															) // validation
													),
													array
													( 
														"keituan"								// Field_name
														, "Keituan"								// Text
														, $this->master->FIELD_VALUE_DEFAULT	// Value method
														, array
															(							// Input type
																$this->master->INPUT_TYPE_ADVANCE_TABLE
															)
														, array
															(
																array
																	(
																		array("nama_data", "nd", true, "Nama Data")
																		, array
																			(
																				"select_one",
																				"so", 
																				true, 
																				"Select One", 
																				array
																				(
																					array("m", "Male"),
																					array("f", "Female")
																				)
																			)
																	)							// field
																, "id_opsi"						// id 
																, array("sample_table_select_data", "stsd")	// table_name						
																, array
																	(
																		array(
																			array("sample_table_opsi_data","stod")	// table join
																			, array(
																				"sample_table_select_data","stsd"
																					)								// table source
																			, "id_opsi"								// field join
																			, "id_opsi"								// field source
																			, array
																				(
																					array
																						(
																						"data_opsi","",true, "Data Opsi"
																						)
																				)							// field join
																			)
																	)
																, array
																	(										// filter field
																		array(
																			"Select Data"					
																			, array
																				(
																					"sample_table_select_data", "stsd"
																				)								// table destination
																			, "nama_data"						// field destination
																			, $this->master->INPUT_TYPE_TEXT	// type input search
																			, array()							// source
																			)
																		, array(
																			"Search Radio"					
																			, array
																				(
																					"sample_table_select_data", "stsd"
																				)								// table destination
																			, "select_one"						// field destination
																			, $this->master->INPUT_TYPE_RADIO	// type input search
																			, array
																				(
																					array("m", "Male")
																					,array("f", "Female")
																				)								// source
																			)
																		, array(
																			"Search Select"					
																			, array
																				(
																					"sample_table_select_data", "stsd"
																				)								// table destination
																			, "select_one"						// field destination
																			, $this->master->INPUT_TYPE_SELECT	// type input search
																			, array
																				(
																					array("m", "Male")
																					,array("f", "Female")
																				)								// source
																			)
																		, array
																			(
																			"Search Select"
																			, array("sample_table_opsi_data", "stod")
																			, "id_opsi"
																			, $this->master->INPUT_TYPE_SIMPLE_TABLE
																			, array("data_opsi"						// field
																					, "id_opsi"						// id 
																					, "sample_table_opsi_data"		// table source						
																					)
																			)
																	)							// filter field
															)
														, array
															(
																$this->master->VALIDATION_MATCH_TABLE
																, array("sample_table_select_data", "id_opsi")
															) // validation
													),
												),
												"sample_table_sub_input",				// table name
												"id_sub_input",							// field id
												"id_coba",								// field foreign
										);
			
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	public function penelitian_det_guru($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
				$pageTitle									// page title
				, $pageUrl									// page url
				, true										// Insert new record
				, true										// Edit Record
				, true										// Delete Record
				, true										// Edit Record if not null
				, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
				,  "tbl_penelitian"					// Table Name
				, false										// Input Mode cross record
				, $this->loginIdUser										// id_user
				, ""										// akses
				, "application/views/upload/"				// upload folder
				, $this->config->item('base_url')			// base url
				, $this->data["engineTemplate"]				// adminPath
				, $pageUrl									// modulename
		);
		$arrayField 	= array(
				array(
						"id"					// Field_name
						, "ID"						// Text
						, $this->master->FIELD_VALUE_AUTO	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_HIDDEN
						)
						, true						// Primary key
						, false						// view
						, false						// edit
						, null						// source
						, $this->master->VALIDATION_NONE	// validation
						, false						// filter
						, null						// filter source
				)
				, array(
						"judul_penelitian"						// Field_name
						, "Judul"					// Nama
						, $this->master->FIELD_VALUE_DEFAULT	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_TEXT
								, array(
										"MAX_LENGTH" 	=> 200
										, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
								)
						)
						, false						// Primary key
						, true						// view
						, true						// edit
						, null						// source
						, array($this->master->VALIDATION_NOTNULL
						)					// validation
						, true						// filter
						, array(
								$this->master->INPUT_TYPE_TEXT
								, null
						)						// filter source
				)
				, array(
						"kegiatan"						// Field_name
						, "Isi"					// Nama
						, $this->master->FIELD_VALUE_DEFAULT	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_TEXT_AREA
								, array(
										"ROWS" 	=> 6
										, "COLS"		=> $this->master->ATTR_SIZE_LONG
								)
						)
						, false						// Primary key
						, false						// view
						, true						// edit
						, null						// source
						, array($this->master->VALIDATION_NOTNULL
						)					// validation
						, false						// filter
						, array(
								$this->master->INPUT_TYPE_TEXT
								, null
						)						// filter source
				)
				
				
				, array(
									"kode_dosen"						// Field_name
									, "Kode Dosen"					// Nama
									, $this->master->FIELD_VALUE_USER	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											, array(
													)
											)
									, false						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, null	// filter source
									, null  // note
									, array(
											$this->master->OPERATOR_EQUAL,
											$this->loginIdUser,
									)						// filter source
				)
				, array(
						"tahun"						// Field_name
						, "Tahun"					// Nama
						, $this->master->FIELD_VALUE_DEFAULT	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_TEXT
								, array(
										"MAX_LENGTH" 	=> 200
										, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
								)
						)
						, false						// Primary key
						, true						// view
						, true						// edit
						, null						// source
						, array($this->master->VALIDATION_NUMERIC
						)					// validation
						, true						// filter
						, array(
								$this->master->INPUT_TYPE_TEXT
								, null
						)						// filter source
				)
				, array(
						"anggaran"				// Field_name
						, "Anggaran"			// Text
						, $this->master->FIELD_VALUE_DEFAULT	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_RADIO
						)
						, false						// Primary key
						, true						// view
						, true						// edit
						, array(array("APBN")
								, array("APBD")
								, array("Lain-lain")
						)
						, array($this->master->VALIDATION_NOTNULL
						)					// validation
						, true						// filter
						, array($this->master->INPUT_TYPE_RADIO
								, null)						// filter source
				)
				, array(
						"jml_anggaran"				// Field_name
						, "Jumlah Anggaran"			// Text
						, $this->master->FIELD_VALUE_DEFAULT	// Value method
						, array(					// Input type
								$this->master->INPUT_TYPE_TEXT
								, array(
										"MAX_LENGTH" 	=> 25
										, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
								)
						)
						, false						// Primary key
						, true						// view
						, true						// edit
						, array($this->master->VALIDATION_NOTNULL
						)					// validation
						, false						// filter
						, array($this->master->INPUT_TYPE_RADIO
								, null)						// filter source
				)
		);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array(
				"Sub Input for Penelitian",
				array
				(
						array
						(
								"kode_dosen"								// Field_name
								, "Dosen"							// Text
								, $this->master->FIELD_VALUE_DEFAULT	// Value method
								, array
									(							// Input type
										$this->master->INPUT_TYPE_SIMPLE_TABLE
									)
/*
								, array(
											array(array("kode_dosen","ni", true, "Kode Dosen")
												, array("nama","na", true, "Nama Dosen")
//												, array("jenis_kelamin", "jk", false, "Jenis Kelamin"
//													, array(array("1", "Laki-laki"),array("0", "Perempuan"))
//														)
//												, array("alamat", "al", false, "Alamat")
												)										// field
											, "kode_dosen"									// id 
											, array("tbl_dosen", "g")	// table_name						
											, array()
										)
*/
								, array("nama"						// field
										, "kode_dosen"						// id 
										, "tbl_dosen"		// table source						
										)
								, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_dosen", "kode_dosen")
											)					// validation
								, true						// filter
								, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
							),
						array(
									"sebagai"						// Field_name
									, "Sebagai"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 70
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
						),
				),
				"tbl_penelitian_detail",				// table name
				"id_penelitian_detail",							// field id
				"id_penelitian",								// field foreign
		);
			
		$this->engineReturn = $this->master->generateSystem(
				$arraySetting
				, $arrayField
				, $arraySubInput
				, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	
	
	public function upload_materi_sub_guru($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, true										// Insert new record
		, true										// Edit Record
		, true										// Delete Record
		, true										// Edit Record if not null
		, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
		,  "tbl_materi"					// Table Name
		, false										// Input Mode cross record
		, $this->loginIdUser						// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, $pageUrl									// modulename
		);
		$arrayField 	= array(
							array(
									"id_materi_upload"					// Field_name
									, "ID"						// Text
									, $this->master->FIELD_VALUE_AUTO	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, true						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
								)
							, array(
									"kode_dosen"					// Field_name
									, "Kode Dosen"					// Text
									, $this->master->FIELD_VALUE_USER	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, false						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, null	// filter source
									, null  // note
									, array(
											$this->master->OPERATOR_EQUAL,
											$this->loginIdUser,
											)
									)
							, array(
									"kode_jurusan"						// Field_name
									, "Jurusan"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array("nama_jurusan"						// field
											, "kode_jurusan"						// id 
											, "tbl_jurusan"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_jurusan", "kode_jurusan")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"kode_mata_kuliah"						// Field_name
									, "Mata Kuliah"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("mata_kuliah"						// field
											, "kode_mata_kuliah"						// id 
											, "tbl_mata_kuliah"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_mata_kuliah", "kode_mata_kuliah")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"judul"						// Field_name
									, "Judul File"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"keterangan"						// Field_name
									, "Keterangan"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT_AREA
											, array(
													"ROWS" 			=> 5
													, "COLS"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
/*
							, array(
									"file_upload"						// Field_name
									, "Upload"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 400
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_URL
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
*/
							, array(
									"file_upload"				// Field_name
									, "Upload"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_FILE
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("sample_upload")
									, array($this->master->VALIDATION_FILE_TYPE
											, array("zip", "rar", "exe", "psd", "pdf")
											)					// validation
									, false						// filter
									, null						// filter source 
									, array("File yang diijinkan (zip, rar, exe, psd, pdf)")
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array();
			
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	
	public function jadwal_mengajar_sub_guru($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, false										// Insert new record
		, false										// Edit Record
		, false										// Delete Record
		, true										// Edit Record if not null
		, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
		,  "tbl_jadwal"					// Table Name
		, false										// Input Mode cross record
		, ""										// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, $pageUrl									// modulename
		);
		$arrayField 	= array(
							array(
									"id_jadwal"					// Field_name
									, "ID"						// Text
									, $this->master->FIELD_VALUE_AUTO	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, true						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
								)
							, array(
									"kode_kelas"						// Field_name
									, "Kelas"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("nama_kelas"						// field
											, "kode_kelas"						// id 
											, "tbl_kelas"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_kelas", "kode_kelas")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"kode_mata_pelajaran"						// Field_name
									, "Mata Pelajaran"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("mata_pelajaran"						// field
											, "kode_mata_pelajaran"						// id 
											, "tbl_mata_pelajaran"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_mata_pelajaran", "kode_mata_pelajaran")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"hari"				// Field_name
									, "Hari"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SELECT
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array(array("senin", "Senin")
											, array("selasa", "Selasa")
											, array("rabu", "Rabu")
											, array("kamis", "Kamis")
											, array("jumat", "Jum'at")
											, array("sabtu", "Sabtu")
											, array("minggu", "Minggu")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SELECT)		// filter source 
								)
							, array(
									"jam_mulai"						// Field_name
									, "Jam Mulai"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 5
													, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_TIME
											)					// validation
									, false						// filter
									, array(
										)						// filter source
									, array("Format HH:MM"
											, "Ex. 08:15, 21:30.")
								)
							, array(
									"jam_selesai"						// Field_name
									, "Jam Selesai"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 5
													, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_TIME
											)					// validation
									, false						// filter
									, array(
										)						// filter source
									, array("Format HH:MM"
											, "Ex. 08:15, 21:30.")
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array();
			
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	
	public function edit_profile_sub_guru($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, false										// Insert new record
		, true										// Edit Record
		, false										// Delete Record
		, true										// Edit Record if not null
		, $this->master->PAGINATION_NONE	// Pagination Type
		,  "tbl_dosen"					// Table Name
		, false										// Input Mode cross record
		, ""										// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, $pageUrl									// modulename
		);
		$arrayField 	= array(
							array(
									"kode_dosen"					// Field_name
									, "Kode"						// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, true						// Primary key
									, true						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
									, null
									, array(
											$this->master->OPERATOR_EQUAL,
											$this->loginIdUser,
											)
								)
							, array(
									"nama"						// Field_name
									, "Nama"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
/*
				, array(
									"nip"						// Field_name
									, "NIP"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 100
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
									, array("")
								)
*/
							, array(
									"jenis_kelamin"				// Field_name
									, "Jenis Kelamin"			// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_RADIO
											)
									, false						// Primary key
									, true				// view
									, false						// edit
									, array(array("1", "Laki-laki")
											, array("0", "Perempuan")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array($this->master->INPUT_TYPE_RADIO
											, null)						// filter source 
								)
							, array(
									"tempat_lahir"						// Field_name
									, "Tempat Lahir"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"tanggal_lahir"						// Field_name
									, "Tanggal Lahir"					// Nama
									, $this->master->FIELD_VALUE_DATE	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 10
													, "SIZE"		=> $this->master->ATTR_SIZE_SHORT
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_DATE
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"agama"				// Field_name
									, "Agama"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SELECT
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
									)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(array("Islam")
											, array("Kristen")
											, array("Hindu")
											, array("Budha")
											, array("Katolik")
											, array("Lainnya")
									)
									, array($this->master->VALIDATION_NOTNULL
									)					// validation
									, false						// filter
									, array($this->master->INPUT_TYPE_SELECT)		// filter source
							)
				
							, array(
									"alamat"		// Field_name
									, "Alamat"		// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT_AREA
											, array(
													"ROWS" 	=> 4
													, "COLS"		=> $this->master->ATTR_SIZE_LONG
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"no_hp"						// Field_name
									, "No Handphone"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 100
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"email"		// Field_name
									, "Email"		// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_EMAIL
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"website"		// Field_name
									, "Website"		// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_URL
											)					// validation
									, false						// filter
									, array(
										)						// filter source
									, array("format website : http://alamat.com")
								)
							, array(
									"facebook"						// Field_name
									, "Alamat Facebook"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 100
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
									, array("Format : http://www.facebook.com/id_facebook"
											,"Contoh =>"
											, "http://www.facebook.com/9797927368"
											, "http://www.facebook.com/inolabs"
											)
								)
							, array(
									"twitter"						// Field_name
									, "Alamat Twitter"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 100
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
									, array("Format : http://www.twitter.com/twitter"
											,"Contoh =>"
											, "http://www.twitter.com/9797927368"
											, "http://www.twitter.com/inolabs"
											)
								)
							, array(
									"pass"		// Field_name
									, "Password"		// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_PASSWORD
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array ()					// filter source
									, array(
											"Kosongkan jika tidak ingin mengubah."
										)						
									)
							, array(
									"status"				// Field_name
									, "Status Dosen"			// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_RADIO
											)
									, false						// Primary key
									, true				// view
									, false						// edit
									, array(array("1", "Aktif")
											, array("0", "Tidak")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array($this->master->INPUT_TYPE_RADIO
											, null)						// filter source 
								)
							, array(
									"photo"				// Field_name
									, "Poto"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_IMAGE
											, array("SIZE" => $this->master->ATTR_SIZE_MEDIUM)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("dosen")
									, array($this->master->VALIDATION_FILE_TYPE
											, array("jpg", "jpeg", "png", "bmp")
											, array(
												array(
														"initial" 	=> "resize"
														, "width" 	=> 200
														, "height"	=> 0
														, "type"	=> "resize"
													),
												array(
														"initial" 	=>	"admin"
														, "width" 	=>	100
														, "height"	=>  0
														, "type"	=> "resize"
														, "thumb_admin"	=> true
													),
												)				// resize
												, true
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array();
			
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	
	public function input_nilai_sub_dosen($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, false										// Insert new record
		, false										// Edit Record
		, false										// Delete Record
		, false										// Edit Record if not null
		, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
		,  "tbl_krs"					// Table Name
		, false										// Input Mode cross record
		, ""										// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, $pageUrl									// modulename
		);
		$arrayField 	= array(
							array(
									"id_krs"					// Field_name
									, "ID"						// Text
									, $this->master->FIELD_VALUE_AUTO	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, true						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
								)
							, array(
									"id_mata_kuliah_jurusan"				// Field_name
									, "Mata Kuliah dan Jurusan"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_ADVANCE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, false						// edit
									, array(
											array()							// field
											, "id_mata_kuliah_jurusan"						// id 
											, array("tbl_mata_kuliah_jurusan", "tmkj")	// table_name						
											, array
													(
													array(
														array("tbl_mata_kuliah","tmk")	// table join
														, array(
															"tbl_mata_kuliah_jurusan","tmkj"
																)								// table source
														, "kode_mata_kuliah"								// field join
														, "kode_mata_kuliah"								// field source
														, array
															(
																array
																	(
																	"nama_mata_kuliah","",true, "Nama Mata Kuliah"
																	)
															)							// field join
														),
													array(
														array("tbl_jurusan","tj")	// table join
														, array(
															"tbl_mata_kuliah_jurusan","tmkj"
																)								// table source
														, "kode_jurusan"								// field join
														, "kode_jurusan"								// field source
														, array
															(
																array
																	(
																	"nama_jurusan","",true, "Nama Jurusan"
																	)
															)							// field join
														),
													array(
														array("tbl_tahun_ajaran","ta")	// table join
														, array(
															"tbl_mata_kuliah_jurusan","tmkj"
																)								// table source
														, "id_tahun_ajaran"								// field join
														, "id_tahun_ajaran"								// field source
														, array
															(
																array
																	(
																	"tahun_ajaran","",true, "Tahun Ajaran"
																	)
															)							// field join
														),
													array(
														array("tbl_semester","ts")	// table join
														, array(
															"tbl_mata_kuliah_jurusan","tmkj"
																)								// table source
														, "id_semester"								// field join
														, "id_semester"								// field source
														, array
															(
																array
																	(
																	"semester","",true, "Semester"
																	)
															)							// field join
														),
													)
											, array
												(										// filter field
													array
													(
													"Mata Kuliah"
													, array("tbl_mata_kuliah", "tmk")
													, "kode_mata_kuliah"
													, $this->master->INPUT_TYPE_SIMPLE_TABLE
													, array("nama_mata_kuliah"						// field
															, "kode_mata_kuliah"						// id 
															, "tbl_mata_kuliah"		// table source						
															)
													), 
													array
													(
													"Tahun Ajaran"
													, array("tbl_tahun_ajaran", "ta")
													, "id_tahun_ajaran"
													, $this->master->INPUT_TYPE_SIMPLE_TABLE
													, array("tahun_ajaran"						// field
															, "id_tahun_ajaran"						// id 
															, "tbl_tahun_ajaran"		// table source						
															)
													), 
												)							// filter field

										)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("sample_table_select_data","id_opsi")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_MEDIUM_TABLE)						// filter source 
								) 
							, array(
									"id_kelas_detail"				// Field_name
									, "Detail Kelas"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_ADVANCE_TABLE
											, array()
											)
									, false						// Primary key
									, false						// view
									, false						// edit
									, array(
											array()							// field
											, "id_kelas_detail"						// id 
											, array("tbl_kelas_detail", "tkd")	// table_name						
											, array
												(
													array(
														array("tbl_kelas","tk")	// table join
														, array(
															"tbl_kelas_detail","tkd"
																)								// table source
														, "kode_kelas"								// field join
														, "kode_kelas"								// field source
														, array
															(
																array
																	(
																	"nama_kelas","",true, "Nama Kelas"
																	)
															)							// field join
														),
													array(
														array("tbl_tahun_ajaran","ta")	// table join
														, array(
															"tbl_kelas_detail","tkd"
																)								// table source
														, "id_tahun_ajaran"								// field join
														, "id_tahun_ajaran"								// field source
														, array
																(
																	array
																	(
																	"tahun_ajaran","",true, "Tahun Ajaran"
																	)
																)							// field join
														),
													array(
														array("tbl_semester","ts")	// table join
														, array(
															"tbl_kelas_detail","tkd"
																)								// table source
														, "id_semester"								// field join
														, "id_semester"								// field source
														, array
															(
																array
																	(
																	"semester","",true, "Semester"
																	)
															)							// field join
														),
													array(
														array("tbl_jurusan","tj")	// table join
															, array(
															"tbl_kelas_detail","tkd"
																)								// table source
														, "kode_jurusan"								// field join
														, "kode_jurusan"								// field source
														, array
															(
																array
																	(
																	"nama_jurusan","",true, "Nama Jurusan"
																	)
															)							// field join
														),
													)
												, array
												(										// filter field
													array
													(
													"Tahun Ajaran"
													, array("tbl_tahun_ajaran", "ta")
													, "id_tahun_ajaran"
													, $this->master->INPUT_TYPE_SIMPLE_TABLE
													, array("tahun_ajaran"						// field
															, "id_tahun_ajaran"						// id 
															, "tbl_tahun_ajaran"		// table source						
															)
													), 
												)							// filter field
										)
										, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_kelas_detail","id_kelas_detail")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_MEDIUM_TABLE)						// filter source 
								)
							, array(
									"nim"					// Field_name
									, "NIM"						// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 50
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NOTNULL	// validation
									, true						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										)						// filter source
									, array(
											$this->master->OPERATOR_EQUAL,
											$this->loginIdUser,
											)
								)
							, array(
									"kode_nilai"						// Field_name
									, "Nilai"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("kode_nilai"						// field
											, "kode_nilai"						// id 
											, "tbl_nilai"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_nilai", "kode_nilai")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array();
		$arrayExtraFilter		= array(
										array(
											array("tbl_tugas_dosen","tgdf")	// table join
											, array(
												"tbl_krs","tbl_krs"
													)								// table source
											, "id_mata_kuliah_jurusan "								// field join
											, "id_mata_kuliah_jurusan "								// field source
											, array
												(
													"kode_dosen",
													$this->master->OPERATOR_EQUAL,
													$this->loginIdUser,
												)							// field join
											),
										array(
											array("tbl_tugas_dosen","tgdf2")	// table join
											, array(
												"tbl_krs","tbl_krs"
													)								// table source
											, "id_kelas_detail "								// field join
											, "id_kelas_detail "								// field source
											, array
												(
													"kode_dosen",
													$this->master->OPERATOR_EQUAL,
													$this->loginIdUser,
												)							// field join
											),
										);
		
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired
		, $arrayExtraFilter);
		return $this->engineReturn;
	}
	
	public function e_learning_sub_guru($pageTitle, $pageUrl)
	{
		$arraySetting 	= array(
		$pageTitle									// page title
		, $pageUrl									// page url
		, true										// Insert new record
		, true										// Edit Record
		, true										// Delete Record
		, true										// Edit Record if not null
		, $this->master->PAGINATION_ADV_NEXT_PREV_NUMBER	// Pagination Type
		,  "tbl_elearning"					// Table Name
		, false										// Input Mode cross record
		, $this->loginIdUser										// id_user
		, ""										// akses
		, "application/views/upload/"				// upload folder
		, $this->config->item('base_url')			// base url
		, $this->data["engineTemplate"]				// adminPath
		, $pageUrl									// modulename
		);
		$arrayField 	= array(
							array(
									"id_elearning"					// Field_name
									, "ID"						// Text
									, $this->master->FIELD_VALUE_AUTO	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											)
									, true						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, $this->master->VALIDATION_NONE	// validation
									, false						// filter
									, null						// filter source
								)
							, array(
									"judul"						// Field_name
									, "Judul"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT
											, array(
													"MAX_LENGTH" 	=> 200
													, "SIZE"		=> $this->master->ATTR_SIZE_MEDIUM
													)
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"isi"						// Field_name
									, "Isi"					// Nama
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_TEXT_AREA_PLUS_EDITOR
											, array(
													"ROWS" 	=> 6
													, "COLS"		=> $this->master->ATTR_SIZE_LONG
													)
											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, null						// source
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, array(
										$this->master->INPUT_TYPE_TEXT
										, null
										)						// filter source
								)
							, array(
									"kode_mata_kuliah"						// Field_name
									, "Mata Kuliah"					// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_SIMPLE_TABLE
											, array()
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array("mata_kuliah"						// field
											, "kode_mata_kuliah"						// id 
											, "tbl_mata_kuliah"		// table source						
											, array(
													)
											)
									, array($this->master->VALIDATION_MATCH_TABLE
											, array("tbl_mata_kuliah", "kode_mata_kuliah")
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_SIMPLE_TABLE)		// filter source 
								)
							, array(
									"tanggal"						// Field_name
									, "Tanggal"					// Nama
									, $this->master->FIELD_VALUE_DATE	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											, array(
													)
											)
									, false						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"kode_dosen"						// Field_name
									, "Kode Dosen"					// Nama
									, $this->master->FIELD_VALUE_USER	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_HIDDEN
											, array(
													)
											)
									, false						// Primary key
									, false						// view
									, false						// edit
									, null						// source
									, array($this->master->VALIDATION_NONE
											)					// validation
									, false						// filter
									, array(
										)						// filter source
								)
							, array(
									"publish"				// Field_name
									, "Publish"			// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_RADIO
											)
									, false						// Primary key
									, true						// view
									, true						// edit
									, array(array("1", "Yes")
											, array("0", "No")
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, true						// filter
									, array($this->master->INPUT_TYPE_RADIO
											, null)						// filter source 
								)
/*
								, array(
									"keyword"					// Field_name
									, "Keyword"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MULTIPLE_VALUE_OUT_TABLE											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
										"tbl_content_keyword_base"			// table name
										, array("keyword", "Keyword")				// field name
										, "id_content_keyword_base"					// field key
										, "tbl_content_keyword"				// out source table name
										, "id_content_keyword"						// out source field key
										, "keyword"						// out source field data
										, "id_content"									// out source field foreign
											)
									, array($this->master->VALIDATION_NOTNULL
											)					// validation
									, false						// filter
									, null						// filter source 
								)
*/
							, array(
									"image"					// Field_name
									, "Image"				// Text
									, $this->master->FIELD_VALUE_DEFAULT	// Value method
									, array(					// Input type
											$this->master->INPUT_TYPE_MULTIPLE_VALUE_IMAGE											)
									, false						// Primary key
									, false						// view
									, true						// edit
									, array(
										"tbl_elearning_gambar"			// out source table name
										, "id_elearning_gambar"					// out source field key
										, "id_elearning"								// out source field foreign
										, "gambar"								// out source field name
										, "guru_learning"								// directory name for image
											)
									, array($this->master->VALIDATION_FILE_TYPE
											, array("jpg", "png", "bmp", "gif")
											, array(
												array(
														"initial" 		=>	"small"
														, "width" 		=>	250
														, "height"		=>  0
														, "type"		=> "resize"
													),
												array(
														"initial" 		=>	"admin"
														, "width" 		=>	80
														, "height"		=>  0
														, "type"		=> "resize"
														, "thumb_admin"	=> true
													),
												),				// resize
												true
											)					// validation
									, false						// filter
									, null						// filter source 
								)
							);
		$arrayDeleteRequired	= array();
		$arraySubInput			= array();
			
		$this->engineReturn = $this->master->generateSystem(
		$arraySetting
		, $arrayField
		, $arraySubInput
		, $arrayDeleteRequired);
		return $this->engineReturn;
	}
	
	public function notFound()
	{
		echo "hoy jangan ngaco";
	}
}
?>